package org.gang.gui;

import org.gang.util.GLogger;
import org.gang.config.Configuration;

import java.util.Iterator;
import java.io.File;

/**
 * Some Gang Intelligent code
 * Please visit http://gang.dinfo.ru for more info
 *
 * @author Vitaly
 * @since 19.04.2007 1:20:18
 */
public class Starter {    
    public static void main(String[] args) {
        GLogger.getInstance().info("=================================");
        GLogger.getInstance().info("Lets list some Java VM properties");
        GLogger.getInstance().info("=================================");
        Iterator itProperties = System.getProperties().keySet().iterator();
        while (itProperties.hasNext())
        {
            Object key = itProperties.next();
            GLogger.getInstance().info(key + "=" + System.getProperties().get(key));
        }

        /**
         *
         */
        File configFolder = new File(Configuration.getRootConfigDirectory());
        if (!configFolder.exists())
        {
            GLogger.getInstance().info("Creating folder for data and configuration files " + Configuration.getRootConfigDirectory());
            if (!configFolder.mkdir())
            {
                GLogger.getInstance().error("Failed creating " + Configuration.getRootConfigDirectory());
            }
        }

        new AccountManager();
    }
}
